package com.atguigu.cloud.handler;

import com.alibaba.csp.sentinel.adapter.spring.webmvc.callback.RequestOriginParser;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Component;

/**
 * ClassName:MyRequestOriginParser
 * Package:com.atguigu.cloud.handler
 * Description:
 *
 * @Author:@郭先森
 * @Create:2025/6/22 - 16:15
 * @Version:v1.0
 */
@Component
public class MyRequestOriginParser implements RequestOriginParser {


    @Override
    public String parseOrigin(HttpServletRequest httpServletRequest) {
        return httpServletRequest.getParameter("serverName");
    }
}
